package com.heima.pojo.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageUserQueryDTO {

    //用户名
    private String userName;

    //角色ID
    private Integer roleId;

    //是否是运维人员
    private Boolean isRepair;

    //页码
    private int pageIndex;

    //每页显示记录数
    private int pageSize;


    public void check() {
        if (pageIndex <= 0) {
            pageIndex = 1;
        }
        if (pageSize <= 0 || pageSize > 100) {
            pageSize = 10;
        }
    }
}
